package com.elink.enginerring.vo;

import java.io.Serializable;

import com.elink.enginerring.common.HessianResultEnum;


public class HessianMessage  implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -230116067478780460L;
	private Integer code;
	private String msg;
	public HessianMessage (Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public static HessianMessage getMessage (HessianResultEnum hessianResultEnum){
		return new HessianMessage(hessianResultEnum.getIndex(), hessianResultEnum.getName());
	}
	@Override
	public String toString() {
		return "HessianMessage [code=" + code + ", msg=" + msg + "]";
	}
	 
}
